package com.leunpha.mini.spider.listener;

import com.leunpha.mini.net.events.NetEvent;

import java.util.Observable;
import java.util.Observer;

/**
 * User: zhoujingjie
 * Date: 14-5-28
 * Time: 上午11:29
 */
public abstract class SpiderListener implements Observer{
    /**
     * @param o   the observable object.
     * @param arg an argument passed to the <code>notifyObservers</code>
     *            method.
     */
    @Override
    public void update(Observable o, Object arg) {
       if(arg instanceof NetEvent){
           NetEvent event = (NetEvent) arg;
           update(o,event);
       }
    }
    public abstract void update(Observable observable,NetEvent event);
}
